import constants from '../constants/index';

const {
    GET_RECRUIT_INFOR_SUCCESS,
    GET_FILE_INFOR_SUCCESS,
    GET_RECRUIT_STEP_SUCCESS,
    GET_RESULT_FILE_SUCCESS
} = constants;

export default (state = {}, action) => {
    switch (action.type) {
        case GET_RECRUIT_INFOR_SUCCESS:
            return {
                ...state,
                infor: action.data,
                resumeId:action.resumeId
            };
        case GET_FILE_INFOR_SUCCESS:
            return {
                ...state,
                fileList:action.data
            };
            case GET_RECRUIT_STEP_SUCCESS:
                return {
                    ...state,
                    stepInfor:action.data
                };
                case GET_RESULT_FILE_SUCCESS:
                    return {
                        ...state,
                        resultFile:action.data
                    };
        default:
            return state;
    }
};
